home *** CD-ROM | disk | FTP | other *** search
/ The Games Machine 76 / XENIATGM66.iso / Indiana Jones / Indiana Jones.exe / RESOURCE / PREVIEW.GOB / cog_jeep_cutscene_pyr.cog < prev    next >
Text File  |  1999-11-15  |  1KB  |  69 lines

  1. # Jones 3D Cog Script
  2. #
  3. # Jeep_Cutscene_pyr.cog
  4. #
  5. # [PKM]
  6. #
  7. # (C) 1999 LucasArts Entertainment Company LLC. All Rights Reserved
  8. #
  9. # ========================================================================================
  10.  
  11. symbols
  12.  
  13.     message        created
  14.     message        user0
  15.     message        user1
  16.  
  17.     thing        jeep                                local
  18.  
  19.     int            jeepMesh                            local
  20.     int            meshRef                                local
  21.  
  22.     model        jeepGasCan=gascan_pyr_jeep.3do        local
  23.  
  24. end
  25.  
  26. # ========================================================================================
  27.  
  28. code
  29.  
  30. created:
  31.     jeep = GetSenderRef();
  32.     jeepMesh = GetMeshByName(jeep, "jeep_body");
  33.     meshRef = SetThingMesh(jeep, jeepMesh, jeepGasCan, 0);
  34.  
  35.     SetThingUserData(jeep, meshRef);
  36.     return;
  37.  
  38. user0:
  39.     jeep = GetParam(0);
  40.     meshRef = GetThingUserData(Jeep);
  41.     if (meshRef != -1)
  42.     {
  43.         // The gas can is currently attached to the jeep - remove it.
  44.  
  45.         RestoreThingMesh(jeep, meshRef);
  46.         SetThingUserData(jeep, -1);
  47.     }
  48.     return;
  49.  
  50. user1:
  51.     jeep = GetParam(0);
  52.     meshRef = GetThingUserData(Jeep);
  53.     if (meshRef != -1)
  54.     {
  55.         // The gas can is currently attached to the jeep - remove it.
  56.  
  57.         RestoreThingMesh(jeep, meshRef);
  58.         SetThingUserData(jeep, -1);
  59.     }
  60.  
  61.     // The gas can is not on the jeep - put it back.
  62.     jeepMesh = GetMeshByName(jeep, "jeep_body");
  63.     meshRef = SetThingMesh(jeep, jeepMesh, jeepGasCan, 0);
  64.  
  65.     SetThingUserData(jeep, meshRef);
  66.  
  67.     return;
  68. end
  69.